#ifndef GAMESTRUCTURES_H
#define GAMESTRUCTURES_H
#include "image.h"
#include "tilebuffer.h"
#include "OamStructures.h"
#define u8 unsigned char
#define u16 unsigned short
#define u32 unsigned long
struct sprite_entry{
    u8 sprtype;
    u8 sprdetail;
};


struct sSpriteTable {
	u32 Pointers;
	u32 Frame;
	
};

struct sDoor{ 
  u8 DoorType;
  u8 OwnerRoom;
  u8 XEntrance;
  u8 DWidth;
  u8 YEntrance;
  u8 DHeight;
  u8 DestDoor;
  u8 ExitDoorLength;
  u8 u1;
  u8 u2;
  u8 u3;
  u8 u4;
};

struct DoorStruct{
 u8 DoorCount;
 u8 DoorNotes[0xFF];
};

struct RHeader{
u8 bTileset;
u8 bBg0;
u8 bBg1;
u8 bBg2;
u32 lBg3;
u32 lForeground;
u32 lLevelData;
u32 lBackLayer;
u32 lClipData;
u32 lBackgroundTSA;
u8 bUnknown1;
u8 TransForeground;//Foreground Transparency
u16 iSep1;
u32 lSpritePointer;
u8 bSpriteIndex1;
u8 bEventSwitch;
u16 iSep2;
u32 lSpritePointer2;
u8 bSpriteIndex2;
u8 bEventSwitch2;
u16 iSeperator;
u32 lSpritePointer3;
u8 bSpriteIndex3;
u8 bMiniMapRoomX;
u8 bMiniMapRoomY;
u8 bEffect;
u8 bSceneryYPos;
u8 bNothing;
u8 bMusic;
u8 blank;
};

struct nEnemies{
    u8 Y;
    u8 X;
    u8 Creature;
};

struct  nEnemyList{
   u8 max;
   nEnemies Enemies[0x20];
};

struct ZMS{//rename this


u16 health;
u16 Dmg;
u16 resistance;
u16 unknown;
u16 smallHP;
u16 largehp;
u16 missiles;
u16 supermissiles;
u16 PowerBombs;

};

struct MFS{
u16 Health;
u16 Damage;
u16 unknownDamage;
u8 resistance;
u8  unknown6;
u16 unknown1;
u16 unknown2;
u16 unknown3;
u16 end;//Always 0?
};

 struct tTSA {
	int max;
	unsigned short ID;
	unsigned short nTSA[0x1080];
};

struct gTileData{

       long gTiles; 
       long pTiles;
       long gBackground; 
       long TSAMap; 
       long EffectSet;

};

struct SE{
 u8 Animated;
 u8 Timer;
 u16 GraphicEnd;

 long GraphicPnt;
};


//CONSOLIDATE THE BELOW
struct SprGBuf{
int id;
RECT  Borders;
Image PreviewSprite;
long  PreviewPal[512];
u8    PreRAM[0x8000];//Funny name XD
u16 PartNo;              //Currently Stoned during writing of preview stuff
OverAllOAM  OAM[512];
TileBuffer  Tiles;
int maxparts;
u8 details;
u16 palsize;
u32 graphicsize;
};

#endif








//EndConsolidationone